import 'package:flutter/material.dart';
import 'package:flutterhello/pages/three/widgets/group_chat.dart';
import 'package:flutterhello/pages/three/widgets/private_chat.dart';

class ThreePage extends StatefulWidget {
  @override
  _ThreePageState createState() => _ThreePageState();
}

class _ThreePageState extends State<ThreePage> {
  // TabController _tabController;

  // @override
  // void initState() {
  //   super.initState();
  //   _tabController = TabController(vsync: this, length: 2);
  // }

  // @override
  // void dispose() {
  //   _tabController.dispose();
  //   super.dispose();
  // }

  // @override
  // Widget build(BuildContext context) {
  //   return Scaffold(
  //     appBar: PreferredSize(
  //       child: AppBar(
  //         backgroundColor: Colors.grey[200],
  //         elevation: 0,
  //         bottom: TabBar(
  //           isScrollable: true,
  //           labelColor: Colors.black87,
  //           indicatorSize: TabBarIndicatorSize.label,
  //           indicatorPadding: EdgeInsets.only(bottom: 10),
  //           unselectedLabelColor: Colors.black45,
  //           tabs: [
  //             Tab(
  //               child: Text(
  //                 '团队',
  //                 style: TextStyle(fontSize: 18),
  //               ),
  //             ),
  //             Tab(
  //               child: Text(
  //                 '私聊',
  //                 style: TextStyle(fontSize: 18),
  //               ),
  //             ),
  //           ],
  //           indicatorColor: Colors.blueGrey,
  //           controller: _tabController,
  //         ),
  //       ),
  //       preferredSize: Size.fromHeight(50),
  //     ),
  //     backgroundColor: Colors.grey[200],
  //     body: TabBarView(
  //       controller: _tabController,
  //       children: <Widget>[GroupChat(), PrivateChat()],
  //     ),
  //   );
  // }
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: PreferredSize(
        child: AppBar(
          backgroundColor: Colors.grey[200],
          elevation: 0,
          title: Text(
            '消息',
            style: TextStyle(color: Colors.black87),
          ),
          centerTitle: true,
        ),
        preferredSize: Size.fromHeight(50),
      ),
      body: GroupChat(),
    );
  }
}
